<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateActivityRedEnvelope extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('activity_red_envelope', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('activityid')->comment('活动id');
            $table->decimal('mininumamount', 16, 2)->default(0.00)->comment('最小消费金额');
            $table->decimal('singleamount', 16, 2)->default(0.00)->comment('单个红包金额');
            $table->integer('number')->default(0)->comment('发放数量');
            $table->decimal('totalamount', 16,2)->default(0.00)->comment('发放总金额');
            $table->integer('firstclassid')->default(0)->comment('一级分类');
            $table->integer('secondclassid')->default(0)->comment('二级分类');
            $table->integer('receivednumber')->default(0)->comment('已领取数量');
            $table->decimal('receivedamount', 16,2)->default(0.00)->comment('已领取金额');
            $table->tinyInteger('status')->default(0)->comment('状态');
            $table->integer('adminid')->default(0)->comment('操作人id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
